import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

  {path:'/',redirect:'/camp/index'},
  {path:'/login',component:()=>import('@/views/Login.vue')},
  {
    path:'/camp',
    component:()=>import('@/views/Index.vue'),
    children:[
      {path:'index',component:()=>import('@/views/Welcome.vue')},
      {path:'activity',component:()=>import('@/views/activity/Index.vue')},
      {path:'stu',component:()=>import('@/views/stu/Index.vue')},
      {path:'teacher',component:()=>import('@/views/teacher/Index.vue')},
      {path:'class',component:()=>import('@/views/class/Index.vue')},
      {path:'course',component:()=>import('@/views/course/Index.vue')},
      {path:'course-class',component:()=>import('@/views/course/CourseClass.vue')},
      {path:'teach',component:()=>import('@/views/teach/Index.vue')},
      {path:'study',component:()=>import('@/views/study/Index.vue')},
      {path:'user',component:()=>import('@/views/user/Index.vue')},
      {path:'data',component:()=>import('@/views/data/Index.vue')},
      {path:'data/cat-activity',component:()=>import('@/views/data/ActivityCat.vue')},
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
